package com.ruoyi.project.cms.controller.api;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.cms.service.ITRichTextService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;


@Api("协议查询")
@ApiIgnore
@RestController
@RequestMapping("/api/cms/richtext")
public class TRichTextApiController extends BaseController
{
    @Autowired
    private ITRichTextService tRichTextService;

    @ApiOperation("根据code来进行查询协议")
    @GetMapping(value = "/{code}")
    public AjaxResult getInfo( @PathVariable("code") String code)
    {
        return AjaxResult.success(tRichTextService.selectTRichTextByCode(code));
    }

}
